import request from './request';
import qs from 'qs';

export const JieKouApi = (params) => request.post("/login/cellphone", qs.stringify(params))

//banner
export const BannerApi = () => request.get("/banner")

// 热门歌曲推荐  /personalized?limit=1
export const RanListApi = (params) => request.post('/personalized/', qs.stringify(params));

//推荐歌单
export const RecomGeDanApi = (params) => request.get("/personalized/", { limit: params.limit })

// 歌手榜 /toplist/artist
export const singerApi = () => request.get('/toplist/artist')

// 热门歌手的歌 /top/artists
export const singSongApi = () => request.get('/top/artists')

//推荐节目
export const RecomJieMuApi = () => request.get("/album/newest")

// 排行榜 /playlist/detail  
export const PlaylistAPi = (id) => request.get(`/playlist/detail?id=${id}`)

// 获取全部
export const ToplistAPi = () => request.get('/toplist/detail')

//榜单
export const BangdanApi = () => request.get("/toplist")

// 榜单歌曲 /personalized
export const PersonalizedApi = (params) => request.post('top/list', qs.stringify(params));

//榜单内容摘要
export const BangdanNeiRongApi = () => request.get("/toplist/detail")

//获取验证码 /captcha/sent 
export const getCodeApi = (params) => request.post("/captcha/sent ", qs.stringify(params))

//登录 /login/cellphone
export const takeCodeApi = (params) => request.post("/login/cellphone ", qs.stringify(params))

//获取用户信息/user/account
export const usermsg = () => request.get("/user/account")

//获取用户详情/user/detail
export const userdetail = (id) => request.get(`/user/detail?uid=${id}`)

//获取登录用户信息 /user/subcount
export const usersubcount = () => request.get("/user/subcount")

//获取用户歌单 /user/playlist
export const userplaylist = (id) => request.get(`/user/playlist?uid=${id}`)

// 全部新碟接口/album/new?area=KR&limit=10
export const AllNewDisks = () => request.get("/album/new?area=All&limit=35")

// 入驻歌手接口/top/artists?offset=0&limit=30
export const Singer = () => request.get("/top/artists?offset=0&limit=10")

// 歌手接口/artist/list?type=1&area=96&initial=b /artist/list?type=2&area=2&initial=b
export const SingerS = () => request.get("/top/artists?offset=0&limit=90")

// 获取歌单评论 /comment/playlist?id=705123491
export const reqCommentPlayList = (id, limit = 20, offset = 0, cookie) => request({ url: `/comment/playlist?id=${id}&limit=${limit}&offset=${offset}&cookie=${cookie}`, method: 'GET' });

// 歌单接口  /top/playlist
export const Playlist = (limit = 35) => request.get(`/top/playlist/highquality?limit=${limit}`)

// 推荐节目接口 /program/recommend
export const Recommend = () => request.get("/program/recommend")

// 节目排行榜接口/dj/program/toplist?limit=1
export const ProgramList = () => request.get("/dj/program/toplist?limit=10")

// 音乐推荐接口 /dj/recommend
export const MusicRecommendation = () => request.get("/dj/hot?limit=4")

// 热门新碟接口/top/album
export const NewDisc = () => request.get("/top/album?offset=0&limit=1&year=2023&month=1")
